function isNotEmptyArray(value:unknown) {
    return Array.isArray(value) && value.length > 0;
}

function getResultByDecode(result:unknown, decodeType: string) {
    // 判断result是不是buffer
    if (!Buffer.isBuffer(result)) {
        return result;
    }
    const decoder = new TextDecoder(decodeType);
    const decodedData = decoder.decode(result);
    return decodedData;
}


export {
    isNotEmptyArray,
    getResultByDecode
}